package com.demo.entity.test;

import java.util.Objects;
import java.util.Set;

/**
 * 扩展角色类VO
 * @author Refresh Token
 * @date 2018/8/30
 * @since 1.0.0
 */
public class RoleBo extends Role {
    /**
     * 该角色的所有权限
     */
    private Set<Func> funcs;

    //角色ID
    private Integer id;
    //角色名称
    private String roleName;
    //角色描述
    private String description;

    public Set<Func> getFuncs() {
        return funcs;
    }

    public void setFuncs(Set<Func> funcs) {
        this.funcs = funcs;
    }

    @Override
    public Integer getId() {
        return id;
    }

    @Override
    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public String getRoleName() {
        return roleName;
    }

    @Override
    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    @Override
    public String getDescription() {
        return description;
    }

    @Override
    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        RoleBo roleBo = (RoleBo) o;
        return Objects.equals(funcs, roleBo.funcs);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), funcs);
    }

    @Override
    public String toString() {
        return "RoleBo{" +
                "funcs=" + funcs +
                ", id=" + id +
                ", roleName='" + roleName + '\'' +
                ", description='" + description + '\'' +
                '}';
    }
}
